home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 19 / Mac Magazin and MacEasy Magazine CD - Issue 19.iso / Wissenschaft & Technik / Open Prolog / Samples / show time < prev    next >
Text File  |  1994-04-18  |  600b  |  31 lines

  1. /* This totally useless procedure ties up Open Prolog just showing the time */
  2.  
  3. show_time(A) :-
  4.     'system$seconds'(B),
  5.     (
  6.         (
  7.             B==A
  8.         ->
  9.             true
  10.         )
  11.     ;
  12.         'system$time'(B,C),
  13.         'system$owner$name'(E),
  14.         (
  15.             (
  16.                 E==''
  17.             ->
  18.                 F='It''s '
  19.             )
  20.         ;
  21.             F=' it''s '
  22.         ),
  23.         'system$set$display'(message,left,E,' it''s ',C,'')
  24.     ),
  25.     show_time(B).
  26.  
  27. /* Try this:
  28.  
  29. 'system$push$display'(message,left,'','','',''),show_time(0),'system$pop$display'(message).
  30.  
  31. */